Skip to content

fix(docs): point "Edit this page" at apps/docs via github.rootDir - #332

Merged
alexgrozav merged 1 commit into
mainfrom
agent/palette/uxf169-docs-edit-rootdir
Aug 11, 2026
Merged

alexgrozav merged 1 commit into
mainfrom
agent/palette/uxf169-docs-edit-rootdir

Conversation

@alexgrozav

Copy link
Copy Markdown
Contributor

Description

The docs theme layer builds the "Edit this page" href as
{url}/edit/{branch}/{rootDir}/content/{stem}.{extension} and filters out falsy
segments. github.rootDir was unset, so the segment was dropped and every link
resolved to https://github.com/styleframe-dev/styleframe/edit/main/content/...
— a 404, because the docs content lives at apps/docs/content/.

Setting rootDir: "apps/docs" restores the correct target.

Found while auditing the same bug in the inkline consumer of @uxfront/layer-docs
(both repos had it). Fixed per-consumer rather than defaulted in the layer, because
the layer cannot know a consumer's directory layout — inferring it from the git root
would be a separate layer change.

Related issue

Relates to UXF-169.

Type of change

  • 🐞 Bug fix (non-breaking change that fixes an issue)

Checklist

  • My commits follow Conventional Commits with a package scope (e.g. feat(theme): …)
  • I ran pnpm build:nodocs && pnpm lint && pnpm typecheck && pnpm test and everything passes
  • I added a changeset (pnpm changeset) for changes to publishable packages, or this change only touches docs/storybook/app/playground/tests
  • I added or updated tests where relevant
  • I updated documentation where relevant
  • I did not edit generated files (dist/, .styleframe/)
  • My PR targets main and stays focused in scope

Notes

One-line config change in apps/docs; no publishable package touched, so no changeset.
Full local suite not run — CI covers it.

Verified in the sibling inkline repo by prerendering the docs and reading the emitted
href, which changed from /edit/main/content/docs/... to
/edit/main/apps/website/content/docs/.... The path shape is identical here.

Separately noted, not changed: toc.bottom.edit in the same file points at
.../edit/main/docs/content, which is also stale — but nothing in the current layer
reads that key, so it is dead config rather than a live 404.

The layer builds the edit href as
`{url}/edit/{branch}/{rootDir}/content/{stem}.{extension}` and drops the
segment when `rootDir` is unset, so every "Edit this page" link resolved to
`/edit/main/content/...` and 404'd — the content lives at `apps/docs/content/`.

Relates to UXF-169.
@changeset-bot

changeset-bot Bot commented Aug 8, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: f33f1e8

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel

vercel Bot commented Aug 8, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
styleframe-dev Ready Ready Preview Aug 8, 2026 5:35am
styleframe-dev-storybook Ready Ready Preview Aug 8, 2026 5:35am

Request Review

@codecov

codecov Bot commented Aug 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@alexgrozav
alexgrozav merged commit d8bd3aa into main Aug 11, 2026
15 checks passed
@alexgrozav
alexgrozav deleted the agent/palette/uxf169-docs-edit-rootdir branch August 11, 2026 08:02

This branch was successfully deployed

2 active deployments
Preview – styleframe-dev — f33f1e80 Deployed Aug 8, 2026 by vercel[bot]
Preview – styleframe-dev-storybook — f33f1e80 Deployed Aug 8, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant